<?php


namespace app\storage\service\bom;

class BomFactory
{


    private static $type = [
        'batch' => '\\app\\storage\\service\\bom\\BatchBomService',
        'retention' => '\\app\\storage\\service\\bom\\RetentionBomService',
    ];

    public static function getBomService($type){
        $type = strtolower($type);
        if (in_array($type, array_keys(self::$type))) {
            $class = self::$type[$type];
            $handler = new $class;
            return $handler;
        }
        return null;
    }
}